import request from '@/utils/axios';

interface IResponseType<P = {}> {
    code?: number;
    msg: string;
    data: P;
}
export const fiveGameList = () => {
    return request<IResponseType>({
        url: 'five/list',
        method: 'get'
    });
};
export const fiveGameCreate = (userId : string) => {
    return request<IResponseType>({
        url: 'five/create',
        method: 'post',
        params:{ userId }
    })
}
export const joinGame = (gameId: string, userId : string) => {
    return request<IResponseType>({
        url: "five/join/"+gameId,
        method: 'post',
        params:{userId}
    })
}